home *** CD-ROM | disk | FTP | other *** search
/ GFX Sensations 1 / Graphic Sensations - Volume 1.iso / tools / amiga / converte / iffascii.lha / Iff2Ascii / iff2ascii.AMOS / iff2ascii.amosSourceCode
Encoding:
AMOS Source Code  |  1994-02-20  |  1.8 KB  |  76 lines

  1. Rem IFF2ASCII (c)1994 Matthew Stratfold M.P.Stratfold@open.ac.uk 
  2. Rem If you make changes please tell me about them. 
  3. Rem Conversion table as detailed in alt.ascii-art FAQ
  4. Rem Routine by M Stratfold 
  5. Dim TABLE$(64)
  6. For I=1 To 64
  7.    Read TABLE$(I)
  8. Next I
  9. Print ""
  10. Print " ___  __  __ ____   ___     V1.1  _ _"
  11. Print "|_ _|/ _|/ _|___ \ / _ \ ___  ___(_|_)"
  12. Print " | || |_| |_  __) | |_| / __|/  _| | |"
  13. Print " | ||  _|  _|/ __/|  _  \__ \  (_| | | "
  14. Print "|___|_| |_| |_____|_| |_|___/\___|_|_|"
  15. Print ""
  16.  
  17. Print ""
  18. Print "  (c)1994 Matthew Stratfold "
  19. Print ""
  20. Print "  Select a picture to convert"
  21. Print "  then click twice to define"
  22. Print "  an area to convert "
  23. Print "  - then wait a little"
  24. Print ""
  25. Print "  Click to start...."
  26. Repeat 
  27. M=Mouse Click
  28. Until M<>0
  29. F$=Fsel$("*.iff","","Choose picture to convert")
  30. If F$="" Then End 
  31. Load Iff F$,1
  32. Limit Mouse 110,40 To 448,296
  33. Curs Off 
  34. Change Mouse 2
  35. Set Line $F0F0
  36. Open Out 1,F$+".txt"
  37. Repeat 
  38.    M=Mouse Click
  39. Until M=1
  40. DX1=X Mouse
  41. DY1=Y Mouse
  42. DX1=X Screen(DX1)
  43. DY1=Y Screen(DY1)
  44. Repeat 
  45.    M=Mouse Click
  46. Until M=1
  47. DX2=X Mouse
  48. DY2=Y Mouse
  49. DX2=X Screen(DX2)
  50. DY2=Y Screen(DY2)
  51. If DY1>DY2 Then Swap DY1,DY2
  52. If DX1>DX2 Then Swap DX1,DX2
  53. Box DX1-1,DY1-1 To DX2+2,DY2+2
  54. For Y=DY1 To DY2 Step 3
  55.    LINE$=""
  56.    For X=DX1 To DX2 Step 2
  57.       INDEX=0
  58.       KEY=0
  59.       For YSTEP=0 To 2
  60.          For XSTEP=0 To 1
  61.             If Point(X+XSTEP,Y+YSTEP) Then KEY=KEY+(2^INDEX)
  62.             INDEX=INDEX+1
  63.          Next XSTEP
  64.       Next YSTEP
  65.       LINE$=LINE$+TABLE$(KEY+1)
  66.    Next X
  67.    Print #1,LINE$+Chr$(10);
  68. Next Y
  69. Close 
  70. End 
  71.  
  72. Data " ","`","'","~","-","!","/","f","-","\","!","V","=","+","Y","*"
  73. Data ".","|","/","7","i","[","/","P","v",")","/","Z","z","D","Z"
  74. Data "A",",","\","!","T","c","t","(","5","i","\","]","Y","e","N"
  75. Data "4","M","_","L","2","X","s","b","K","K","g","G","d","8","m"
  76. Data "W","W","@"